unit uFormCadIndustriaMarca;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, uFormBaseCadastro, Datasnap.Provider,
  Data.DB, Datasnap.DBClient, System.Actions, Vcl.ActnList, Vcl.StdCtrls,
  Vcl.Buttons, Vcl.ExtCtrls, Vcl.ComCtrls, Vcl.Mask, Vcl.DBCtrls;

type
  TFormCadIndustriaMarca = class(TFormBaseCadastro)
    lblId: TLabel;
    edtId: TDBEdit;
    lblDescricao: TLabel;
    edtDescricao: TDBEdit;
    procedure actPesquisarExecute(Sender: TObject);
    procedure cdsMestreReconcileError(DataSet: TCustomClientDataSet;
      E: EReconcileError; UpdateKind: TUpdateKind;
      var Action: TReconcileAction);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

  procedure CadIndustriaMarca;

implementation

{$R *.dfm}

uses uTipo, uFormPesquisa, uDM;

procedure CadIndustriaMarca;
var
  F: TFormCadIndustriaMarca;
begin
  F := TFormCadIndustriaMarca.Create(nil);
  try
    F.Show;
  finally

  end;
end;

procedure TFormCadIndustriaMarca.actPesquisarExecute(Sender: TObject);
var
  Dados: TIndustriaMarca;
begin
  inherited;
  if PesquisarIndustriaMarca(Dados) then
  begin
    cdsMestre.Close;
    cdsMestre.Params.ParamByName('Id').AsInteger := Dados.Id;
    cdsMestre.Open;
  end;
end;

procedure TFormCadIndustriaMarca.cdsMestreReconcileError(
  DataSet: TCustomClientDataSet; E: EReconcileError; UpdateKind: TUpdateKind;
  var Action: TReconcileAction);
var
  Erro: String;
begin
  inherited;
  Erro := E.Message;
end;

initialization
  RegisterClass(TFormCadIndustriaMarca);

end.
